import request from '@/utils/request'

// 获取班次类型下拉列表
export function getShiftTypeList() {
  return request({
    url: '/dispatch/dispatch/DispatchClassesAdmin/classesTypeList',
    method: 'get'
  })
}

// 查询班次管理列表
export function getShiftList(params) {
  return request({
    url: '/dispatch/dispatch/DispatchClassesAdmin/list',
    method: 'get',
    params
  })
}

// 获取班次管理详细信息
export function getShiftDetail(departmentId) {
  return request({
    url: `/dispatch/dispatch/DispatchClassesAdmin/${departmentId}`,
    method: 'get'
  })
}

// 新增班次管理
export function addShift(data) {
  return request({
    url: '/dispatch/dispatch/DispatchClassesAdmin',
    method: 'post',
    data
  })
}

// 修改班次管理
export function updateShift(data) {
  return request({
    url: '/dispatch/dispatch/DispatchClassesAdmin',
    method: 'put',
    data
  })
}

// 删除班次管理
export function deleteShift(departmentIds) {
  return request({
    url: `/dispatch/dispatch/DispatchClassesAdmin/${departmentIds}`,
    method: 'delete'
  })
}